package Demo1;

public class Test {
    public static void eat(Animal a){
        a.eat();
    }

    public static void main(String[] args) {
        Cat cat=new Cat("AT",2);
        Dog dog=new Dog("小米渣",1);
        eat(cat);
        eat(dog);
    }
}
